﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Clients.ascx.cs" Inherits="Sites_Vigor_Webparts_Common_Clients" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.HighlightLink" %>
<div style="clear: both;" class="left-block">
    <div class="block-wrapper">
        <h2 class="cat-title"><span>ĐỐI TÁC</span></h2>
        <div class="block-text-wrapper">
            <div class="client-list">
                <div class="client-list-wrapper">
                    <div class="jcarousel-skin-ie7">
                        <ul id="ulRefList" class="multiple jcarousel-skin-ie7"><% 
HighlightLinkGroup hGroup = HighlightLinkGroup.GetItem(LanguageUtility.GetLanguageID() == 1 ? 5 : 7);
if (hGroup != null && hGroup.Links.Count > 0)
{
    string imagePath = "/" + NTTHAO.CommonWeb.Constant.UPLOAD_FILE_PATH + hGroup.ImagePath;
    int count = 0;
    while (count < 7)
    {
        int innerCount = 0;
        for (int i = 0; i < hGroup.Links.Count && (hGroup.MaxItemCount < 0 || (count + innerCount) < hGroup.MaxItemCount); i++)
        {
            HighlightLink link = hGroup.Links[i];
            if (link.Activated)
            {
                innerCount++;
%>
                            <li><a href="<%=link.Href %>" target="<%=link.Target %>"><img alt="<%=Server.HtmlEncode(link.Title).Replace(Environment.NewLine, " ") %>" title="<%=Server.HtmlEncode(link.Title).Replace(Environment.NewLine, " ") %>" src="<%=imagePath + link.ImageName %>" /></a></li><% 
            }
        }
        if (innerCount < 1)
        {
            break;
        }
        count += innerCount;
    }
}
%>
                        </ul>
                    </div>
                    <script type="text/javascript">
                        function mycarousel_initCallback(carousel) {
                        carousel.clip.hover(function() {
                                carousel.stopAuto();
                        }, function() {
                                carousel.startAuto();
                        });
                        };
                        jQuery('#ulRefList').jcarousel({scroll: 4, auto: 3, wrap: 'circular', initCallback: mycarousel_initCallback});
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>